﻿namespace Core
{
    public class UITab : UITileElement
    {
        [UIField("Checkmark")]
        private readonly UIImage img_checkmark;
        [UIField("Text")]
        private readonly UILabel lbl_text;

        private bool m_isOn;
        public bool IsOn
        {
            get => m_isOn;
            set
            {
                SetOn(value);
            }
        }

        public void SetOn(bool value)
        {
            m_isOn = value;
            img_checkmark.SetActive(value);
        }

        public void SetText(string text)
        {
            lbl_text.text = text;
        }
    }
}
